<%--                                                                       --%>
<%-- Copyright (c) 2004-2005 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el" %>

<script language="JavaScript">

//
//
//
function doChannelDelete(form) {
  if (!confirm("<bean-el:message key="ep.channel.confirm.delete" bundle="ep.messages"/>")) return;
  form.elements['ctx.f'].value = "<c:out value="${requestScope['ctx.c']}"/>";
  form.action = "<c:url value="/ep/channelDelete.do"/>";
  form.submit();
}

//
//
//
function doDone(form) {
  form.action = "<c:url value="/ep/cancel.do"/>";
  form.submit();
}

</script>

<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
  <tr>
    <td valign="top" width="100%">
      <div class="pageTitle">
        <bean-el:message key="ep.channel.view.page.title" bundle="ep.messages" arg0="${epChannelView.map.name}"/>
      </div>
      <div class="errorMessage"><html-el:errors bundle="ep.messages"/></div>
      <%@ include file="/mc/common/pagetab.jsp" %>

      <div class="breadcrumb">
      <c:if test="${not empty epChannelView.map.breadcrumbs}">
        <c:forEach var="channel" items="${epChannelView.map.breadcrumbs}" varStatus="index">
          <c:url var="browseUrl" value="/ep/channelBrowse.do">
            <c:param name="channelId" value="${channel.map.id}"/>
          </c:url>
          <c:if test="${index.count > 1}"><bean-el:message key="ep.breadcrumb.delimiter" bundle="ep.messages"/>&nbsp;</c:if><a href="<c:out value="${browseUrl}"/>"><c:out value="${channel.map.name}"/></a>
        </c:forEach>
      </c:if>
      </div>

      <html-el:form action="/ep/channelEdit.do">
      <html-el:hidden property="channelId" value="${epChannelView.map.id}"/>
      <input type="hidden" name="ctx.f" value="<c:out value="${requestScope['ctx.f']}"/>"/>

      <div class="pageSubtitle">
        <span class="left"><bean-el:message key="ep.channel.information" bundle="ep.messages"/></span>
        <span class="right">
<c:if test="${epChannelView.map.editable}">
          <input type="submit" class="inputButton" value="<bean-el:message key="button.edit" bundle="ep.messages"/>">
          <input type="button" class="inputButton" value="<bean-el:message key="button.delete" bundle="ep.messages"/>"
            onclick="doChannelDelete(this.form);">
</c:if>
        </span>
      </div>

      </html-el:form>

      <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="label" width="30%"><bean-el:message key="ep.channel.name" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%"><c:out value="${epChannelView.map.name}"/>
        </td>
      </tr>

      <tr>
        <td class="label" width="30%"><bean-el:message key="ep.channel.display" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%">
<c:if test="${epChannelView.map.startType == 0}">
          <bean-el:message key="ep.script" bundle="ep.messages"/><br><c:out value="${epChannelView.map.pagePath}"/>
</c:if>
<c:if test="${epChannelView.map.startType == 1}">
          <bean-el:message key="ep.url" bundle="ep.messages"/><br><c:out value="${epChannelView.map.pagePath}"/>
</c:if>
<c:if test="${epChannelView.map.startType == 2}">
          <bean-el:message key="ep.channel.startType.display.template" bundle="ep.messages"/><br><c:out value="${epChannelView.map.pagePath}"/>
</c:if>
        </td>
      </tr>

      <tr>
        <td class="label" width="30%"><bean-el:message key="ep.description" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%"><c:out value="${epChannelView.map.description}"/>
        </td>
      </tr>

      <tr>
        <td class="label" width="30%"><bean-el:message key="ep.status" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%">
            <c:choose>
              <c:when test="${epChannelView.map.status == 0}">
              <bean-el:message key="ep.label.offline" bundle="ep.messages"/>
              </c:when>
	      <c:otherwise>
	      <bean-el:message key="ep.label.online" bundle="ep.messages"/>
	      </c:otherwise>
            </c:choose>
        </td>
      </tr>

<c:if test="${epChannelView.map.showNavigable}">
      <tr>
        <td class="label" width="30%"><bean-el:message key="ep.navigable" bundle="ep.messages"/>:</td>
		<td class="labelField" width="70%">
		  <c:choose>
              <c:when test="${epChannelView.map.navigable == 0}">
              <bean-el:message key="ep.yes" bundle="ep.messages"/>
              </c:when>
	          <c:otherwise>
	          <bean-el:message key="ep.no" bundle="ep.messages"/>
	          </c:otherwise>
          </c:choose>
		</td>
      </tr>
</c:if>

      <tr>
        <td class="label" width="30%"><bean-el:message key="ep.channel.parent.channel" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%">
<c:forEach var="item" items="${epChannelView.map.parentChannels}" varStatus="index">
        <c:out value="${item.map.name}"/><br>
</c:forEach>
        </td>
      </tr>

      </table>

<c:if test="${0 == 1}">
      <form method="post">

      <input type="hidden" name="channelId" value="<c:out value="${epChannelAdministratorsView.map.id}"/>"/>
      <input type="hidden" name="ctx.f" value="<c:out value="${requestScope['ctx.c']}"/>"/>

      <div class="pageButtonWrap" align="right">
        <input type="button" name="done" class="inputButton" value="<bean-el:message key='button.done' bundle="ep.messages"/>" onclick="doDone(this.form)">
      </div>

      </form>
</c:if>

  </td></tr>
</table> 
	
    </td>
  </tr>
</table>
